package main

import "fmt"

func DontUpdate() {
	var p *int
	p = nil
	fmt.Println(p)
    // p没有合法指向
	//*p = 8888  //invalid memory address or nil pointer dereference
	var a int
	p = &a
	fmt.Printf("a=%v",a)
}


func main()  {
	var a int =10
	/*
	*每个变量有2层含义:变量的内存，变量的地址
	*/
	fmt.Printf("a = %d\n",a)
	fmt.Printf("a = %v\n",&a)
	DontUpdate()
}
